<?php
/**
 *	description:ZMAXWECHAT 图文消息编辑页面
 *  author：min.zhang
 *  Email:zhang19min88@163.com
 *	Url:http://www.zmax99.com
 *  copyright:南宁市程序人软件科技有限责任公司保留所有权利
 *  date:2016-04-28
 *  @license GNU General Public License version 3, or later
 *  chck date:2016-05-26
 *  chcker :min.zhang
 */
 
defined('_JEXEC') or die ('can not access this file!');

JHtml::_('jquery.framework');
JHtml::_('behavior.formvalidation');

?>

<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'media.cancel' || document.formvalidator.isValid(document.id('adminForm')))
		{
			Joomla.submitform(task, document.getElementById('adminForm'));
		}
	}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_zmaxwechat&view=media&layout=edit&id='.(int)$this->item->id);?>" method="post" name="adminForm" class="form-validate" id="adminForm"  enctype="multipart/form-data">
	<?php  echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>
	<div class="form-horizontal">	
		<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'main')); ?>
		
		<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
		<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label, true)); ?>
		<div class="row-fluid">
			<?php if($fieldset->name=="main"):?>
				<div class="span9">
					<div class="row-fluid form-horizontal-desktop">
						<?php echo  $this->form->renderFieldset($fieldset->name);?>
					</div>
				</div>
				<div class="span3">
					<?php echo $this->form->getInput('id'); ?>
					<?php echo $this->form->getInput('media_id'); ?>
					<?php echo $this->form->getLabel('create_date'); ?>
					<?php echo $this->form->getInput('create_date'); ?>
					<?php echo $this->form->getLabel('author'); ?>
					<?php echo $this->form->getInput('author'); ?>
				</div>
			<?php else:?>
				<div class="span12">
					<div class="row-fluid form-horizontal-desktop">
						<?php echo  $this->form->renderFieldset($fieldset->name);?>
					</div>
				</div>
			<?php endif;?>
		</div>
		<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endforeach; ?>
	</div>
	
	<div>
		<input type="hidden" name="task" value=""/>
		<input type="hidden" name="id" value="<?php echo  $this->item->id;?>" />
		<?php echo JHtml::_('form.token');?>
	</div>
</form>
